'use strict';
/**
 * Created by deng on 16-1-19.
 */
angular.module('metalabPartnerApp').config(['$stateProvider', function ($stateProvider) {

    $stateProvider.state('meta.demand.detail.cooperation', {
        abstract: true,
        url: '/cooperation',
        views: {
            'body@meta': {
                templateUrl: 'views/common/formContainer.html',
                controller: function ($scope) {
                    $scope.formCopywriter = {
                        'title': '需求合作申请表',
                        'step': [
                            {'content': '解决方案概要', 'state': 'meta.demand.detail.cooperation.step.one'},
                            {'content': '解决方案详细', 'state': 'meta.demand.detail.cooperation.step.two'},
                            {'content': '解决方案相关者', 'state': 'meta.demand.detail.cooperation.step.three'},
                            {'content': '', 'state': 'meta.demand.detail.cooperation.step.success'}
                        ]
                    };
                }
            }
        }
    }).state('meta.demand.detail.cooperation.step', {
        abstract: true,
        url: '',
        views: {
            'formDetail@meta.demand.detail.cooperation': {
                templateUrl: 'views/demand/detail/cooperation/cooperation.html',
                controller: 'DemandCooperationCtrl'
            }
        },
        data: {
            pageMode: 'safe'
        }
    }).state('meta.demand.detail.cooperation.step.one', {
        url: '/1',
        views: {
            'formStep': {
                templateUrl: 'views/demand/detail/cooperation/step1.html'
            }
        }
    }).state('meta.demand.detail.cooperation.step.two', {
        url: '/2',
        views: {
            'formStep': {
                templateUrl: 'views/demand/detail/cooperation/step2.html'
            }
        }
    }).state('meta.demand.detail.cooperation.step.three', {
        url: '/3',
        views: {
            'formStep': {
                templateUrl: 'views/demand/detail/cooperation/step3.html'
            }
        }
    }).state('meta.demand.detail.cooperation.step.success', {
        url: '/success?toState&moduleName&moduleId',
        views: {
            'formStep': {
                templateUrl: 'views/common/formSuccess.html',
                controller: 'CountdownCtrl'
            }
        },
        data: {
            toState: 'meta.demand.list.all',
            pageMode: 'compatible'
        }
    });
}]);
